package com.itheima.health.dao;

import com.itheima.health.common.ExportExcelData;
import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 预约DAO
 */
@Mapper
@Repository
public interface OrderDao {

    //保存预约订单信息
    void save(Order order);

    //通过预约订单id查询 体检人姓名
    String selectMemberNameByOrderId(String orderId);

    //通过预约订单id查询 套餐名称
    String selectSetmealNameByOrderId(String orderId);
    Integer findTodayOrderNumber(@Param("today") String today);

    Integer findTodayVisitsNumber(@Param("today") String today);

    Integer findThisWeekOrderNumber(@Param("weekOrder") String weekTimesStart);

    Integer findThisWeekVisitsNumber(@Param("weekVisits") String weekTimesStart);

    Integer findThisMonthOrderNumber(@Param("monthOrder") String monthTimesStart);

    Integer findThisMonthVisitsNumber(@Param("monthVisits") String monthTimesStart);

    List<Map> findHotSetmeal();

    //通过预约订单id查询 预约日期
    Date selectDateByOrderId(String orderId);

    //通过预约订单id查询 预约类型
    String selectOrderTypeById(String orderId);
    List<Map<String, Object>> findReportBySetmeal();

    //导出excel数据
    List<ExportExcelData> selectListHotSermeal();

    //通过memberId查询order预约信息
    List<Order> findOrderByMemberId(Integer id);
}
